
<%= form_for(@order) do |f| %>
  <% if @order.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@order.errors.count, "处不合要求") %></h2>

      <ul>
      <% @order.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name, "姓名" %><br />
<!-- START_HIGHLIGHT -->
    <%= f.text_field :name, :size => 40 %>
<!-- END_HIGHLIGHT -->
  </div>
  <div class="field">
    <%= f.label :address, "配送地址" %><br />
<!-- START_HIGHLIGHT -->
    <%= f.text_area :address, :rows => 3, :cols => 40 %>
<!-- END_HIGHLIGHT -->
  </div>
  <div class="field">
    <%= f.label :email, "邮箱" %><br />
<!-- START_HIGHLIGHT -->
    <%= f.email_field :email, :size => 40 %>
<!-- END_HIGHLIGHT -->
  </div>
  <div class="field">
    <%= f.label :pay_type, "支付方式"%><br />
<!-- START_HIGHLIGHT -->
    <%= f.select :pay_type, Order::PAYMENT_TYPES,
                  :prompt => '请选择支付方式' %>
<!-- END_HIGHLIGHT -->
  </div>
  <div class="actions">
<!-- START_HIGHLIGHT -->
    <%= f.submit '结算' %>
<!-- END_HIGHLIGHT -->
  </div>
<% end %>
